"use strict";
const common_vendor = require("../../../../common/vendor.js");
const uni_modules_uniLoadMore_components_uniLoadMore_i18n_index = require("./i18n/index.js");
let platform;
setTimeout(() => {
    platform = common_vendor.index.getSystemInfoSync().platform;
}, 16);
const {
    t
} = common_vendor.initVueI18n(uni_modules_uniLoadMore_components_uniLoadMore_i18n_index.messages);
const _sfc_main = {
    name: "UniLoadMore",
    emits: ["clickLoadMore"],
    props: {
        status: {
            // 上拉的状态：more-loading前；loading-loading中；noMore-没有更多了
            type: String,
            default: "more"
        },
        showIcon: {
            type: Boolean,
            default: true
        },
        iconType: {
            type: String,
            default: "auto"
        },
        iconSize: {
            type: Number,
            default: 24
        },
        color: {
            type: String,
            default: "#777777"
        },
        contentText: {
            type: Object,
            default() {
                return {
                    contentdown: "",
                    contentrefresh: "",
                    contentnomore: ""
                };
            }
        },
        showText: {
            type: Boolean,
            default: true
        }
    },
    data() {
        return {
            webviewHide: false,
            platform,
            imgBase64: ""
        };
    },
    computed: {
        iconSnowWidth() {
            return (Math.floor(this.iconSize / 24) || 1) * 2;
        },
        contentdownText() {
            return this.contentText.contentdown || t("uni-load-more.contentdown");
        },
        contentrefreshText() {
            return this.contentText.contentrefresh || t("uni-load-more.contentrefresh");
        },
        contentnomoreText() {
            return this.contentText.contentnomore || t("uni-load-more.contentnomore");
        }
    },
    mounted() {
    },
    methods: {
        onClick() {
            this.$emit("clickLoadMore", {
                detail: {
                    status: this.status
                }
            });
        }
    }
};

function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
    return common_vendor.e({
        a: !$data.webviewHide && ($props.iconType === "circle" || $props.iconType === "auto" && $data.platform === "android") && $props.status === "loading" && $props.showIcon
    }, !$data.webviewHide && ($props.iconType === "circle" || $props.iconType === "auto" && $data.platform === "android") && $props.status === "loading" && $props.showIcon ? {
        b: $props.color,
        c: $props.iconSize / 12,
        d: $props.color,
        e: $props.iconSize / 12,
        f: $props.color,
        g: $props.iconSize / 12,
        h: $props.iconSize + "px",
        i: $props.iconSize + "px"
    } : !$data.webviewHide && $props.status === "loading" && $props.showIcon ? {
        k: $data.imgBase64,
        l: $props.iconSize + "px",
        m: $props.iconSize + "px"
    } : {}, {
        j: !$data.webviewHide && $props.status === "loading" && $props.showIcon,
        n: $props.showText
    }, $props.showText ? {
        o: common_vendor.t($props.status === "more" ? $options.contentdownText : $props.status === "loading" ? $options.contentrefreshText : $options.contentnomoreText),
        p: $props.color
    } : {}, {
        q: common_vendor.o((...args) => $options.onClick && $options.onClick(...args))
    });
}

const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "D:/bj0517听书/配套资料/07-前端代码/ListenToBooks-master/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue"]]);
wx.createComponent(Component);
